package test2;

import java.io.*;
import java.util.*;

public class Prime {
	public static void main(String[] args)throws IOException{
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		Set<Integer> set = new HashSet<Integer>();
	    System.out.print("Enter number:");
	    int num = Integer.parseInt(bf.readLine());
	    int i;
	    for (i=2; i < num ;i++ ){
	      int n = num%i;
	      if(i == num-1){
	    	  	System.out.println(set);
	        	break;
	        }
	      if (n==0){
	    	set.add(i);
	        //System.out.println("not Prime!");
	      }
	    }
	    if(i == num){
	      System.out.println("Prime number!");
	    }
	}
	
	//public static void prime()
}
